package com.arpa.wms.mapper;

import com.arpa.wms.domain.dto.WarehouseDTO;
import com.arpa.wms.domain.entity.Warehouse;
import com.arpa.wms.domain.vo.WarehouseVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 仓库 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
public interface WarehouseMapper extends BaseMapper<Warehouse> {

    /**
     * 查询列表
     * @param warehouseDTO
     * @return
     */
    List<WarehouseVO> queryList(WarehouseDTO warehouseDTO);

    /**
     * 查询合计,包含总数
     * @param warehouseDTO
     * @return
     */
    WarehouseVO queryListSum(WarehouseDTO warehouseDTO);


    /**
     * 更新仓库状态
     * @param codes
     * @param status
     * @return
     */
    int changeStatus(@Param("codes")String codes,@Param("status")String status,@Param("deleteFlag")String deleteFlag,@Param("groupCode")String groupCode);


    /**
     * 0库存的仓库
     * @param codes
     * @return
     */
    List<String> emptyWarehouse(@Param("codes") String codes);
    /**
     *  @author: Allen chen
     *  @Date: 2020/10/10 9:15
     *  @Description: 根据code批量查询
     */
    List<WarehouseVO> getByCodes(@Param("list") List<String> list,@Param("groupCode")String groupCode);

    /**
     * 查询列表不分页
     * @param warehouseDTO
     * @return
     */
    List<WarehouseVO> queryWarehouseList(WarehouseDTO warehouseDTO);
}
